home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / contrib / xyps-r.tex < prev    next >
Encoding:
Text File  |  1995-03-15  |  2.1 KB  |  53 lines

  1. %% xyps-r.tex from $Id: xyps-r.doc,v 2.9 1994/06/09 14:38:56 ross Exp $
  2. %%
  3. %% XY-pic ``PostScript Rotations and Scaling''.
  4. %% Copyright (c) 1993-1994 Ross Moore <ross@mpce.mq.edu.au>
  5. %%
  6. %% This file is part of the XY-pic package for graphs and diagrams in TeX.
  7. %% See the companion README and INSTALL files for further information.
  8. %% Copyright (c) 1991-1994 Kristoffer H. Rose <kris@diku.dk>
  9. %%
  10. %% The XY-pic package is free software; you can redistribute it and/or modify
  11. %% it under the terms of the GNU General Public License as published by the
  12. %% Free Software Foundation; either version 2 of the License, or (at your
  13. %% option) any later version.
  14. %%
  15. %% The XY-pic package is distributed in the hope that it will be useful, but
  16. %% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  17. %% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  18. %% for more details.
  19. %%
  20. %% You should have received a copy of the GNU General Public License along
  21. %% with this package; if not, write to the Free Software Foundation, Inc.,
  22. %% 675 Mass Ave, Cambridge, MA 02139, USA.
  23. %%
  24. \ifx\xypsrloaded\relax \message{not reloaded}\endinput \fi
  25. \let\xypsrloaded=\relax \xycatcodes
  26. \xyrequire{rotate}
  27. \xyrequire{ps}
  28. \xycatcodes
  29. \xydef@\xyPSpretransform@{\xyPSrawA@{\preXYtransform@@}}
  30. \xydef@\xyPSposttransform@{\xyPSrawZ@{\postXYtransform@@}}
  31. \xyPSalternative@{\preXYtransform@}{pretransform}
  32. \xyPSalternative@{\postXYtransform@}{posttransform}
  33. \xydef@\xyPSscale@#1#2{%
  34.  \xyPSsplitPS@{\xyscale@start(#1,#2)}{\xyscale@end}\xyPSpsxy@ 
  35.  }
  36. \xydef@\xyscale@start(#1,#2){xyXpos xyYpos 2 copy translate
  37.  #1\space#2\space scale neg exch neg exch translate }
  38. \xydef@\xyscale@end{}
  39.  \xyPSalternative@{\xyscale@@}{scale}
  40. \xydef@\xyrot@start(#1){ xyXpos xyYpos 2 copy translate
  41.  #1\space neg rotate neg exch neg exch translate }
  42. \xydef@\xyrot@end{}
  43. \xydef@\xyPSrotate@#1{%
  44.  \xyPSsplitPS@{\xyrot@start(#1 setupDirection XYdirection 2 mul)}{}%
  45.  \xyPSpsxy@ 
  46.  }
  47. \xydef@\xyPSspecialRotate@#1{%
  48.  \xyPSsplitPS@{\xyrot@start(#1)}{}\xyPSpsxy@ 
  49.  }
  50. \xyPSalternative@{\xyRotate@@}{rotate}
  51. \xyPSalternative@{\xySpecialRotate@@}{specialRotate}
  52. \xyendinput
  53.